﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="userDiscussionsAdded.aspx.vb" Inherits="Web_2._0_BMW___X6_Experts_Web_Application.userDiscussionsAdded" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .style2
        {
            font-size: x-large;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <span class="style2"><strong>BMW - X6 Discussion Forum - </strong></span>
        <em style="font-size: x-large"><strong>Discussions Added...</strong></em></p>
        <div class="userDiscussionsAddedContent">
        
        
        
            These are the discussions which you have uploaded and clicking in their titles 
            will bring up the post replies.
        
        
        </div>
        <br />
        <div class = "userDiscussionsAdded">
        
        
        
            <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" 
                style="font-size: small; font-family: Calibri">
                <AlternatingItemTemplate>
                        

                        <strong>Title:</strong>
                       <asp:Label ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
                        <br />
                        <strong>Date Discussion Created:</strong>
                        <asp:Label ID="DateCreatedLabel" runat="server" 
                            Text='<%# Eval("DateCreated") %>' />
                        <br />
                        <br />
                    </AlternatingItemTemplate>
                    <EditItemTemplate>
                        DiscussionID:
                        <asp:Label ID="DiscussionIDLabel1" runat="server" 
                            Text='<%# Eval("DiscussionID") %>' />
                        <br />
                        <strong>Title:</strong>
                        <asp:TextBox ID="TitleTextBox0" runat="server" Text='<%# Bind("Title") %>' />
                        
                        <br />
                        <strong>Date Discussion Created:</strong>
                        <asp:TextBox ID="DateCreatedTextBox" runat="server" 
                            Text='<%# Bind("DateCreated") %>' />
                        <br />
                        <br />
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                            Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                            Text="Cancel" />
                        <br />
                        <br />
                        </span>
                    </EditItemTemplate>
                    <EmptyDataTemplate>
                        <span>No data was returned.</span>
                    </EmptyDataTemplate>
                    <InsertItemTemplate>
                        DiscussionID:
                        <asp:Label ID="DiscussionIDLabel2" runat="server" 
                            Text='<%# Eval("DiscussionID") %>' />
                        <br />
                        <strong>Title:</strong>
                        <asp:TextBox ID="TitleTextBox1" runat="server" Text='<%# Bind("Title") %>' />
                        <br />
                        <strong>Date Discussion Created:</strong>
                        <asp:TextBox ID="DateCreatedTextBox0" runat="server" 
                            Text='<%# Bind("DateCreated") %>' />
                        <br />
                        <br />
                        <asp:Button ID="UpdateButton0" runat="server" CommandName="Update" 
                            Text="Update" />
                        <asp:Button ID="CancelButton0" runat="server" CommandName="Cancel" 
                            Text="Cancel" />
                        <br />
                        <br />
                        </span>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        

                        
                        <strong>Title:</strong>
                        
                        <asp:Label ID="TitleTextBox2" runat="server" Text='<%# Bind("Title") %>' />
                        <br />
                        <strong>Date Discussion Created:</strong>
                        <asp:Label ID="DateCreatedLabel0" runat="server" 
                            Text='<%# Eval("DateCreated") %>' />
                        <br />
                        <br />
                        </span>
                    </ItemTemplate>
                    <LayoutTemplate>
                        <div ID="itemPlaceholderContainer" runat="server" 
                            style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <span runat="server" id="itemPlaceholder" />
                        </div>
                        <div style="text-align: center;background-color: #CCCCCC; font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10">
                            
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                    <asp:NumericPagerField />
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                </Fields>
                            </asp:DataPager>
                        </div>
                    </LayoutTemplate>
                    <SelectedItemTemplate>
                        DiscussionID:
                        <asp:Label ID="DiscussionIDLabel3" runat="server" 
                            Text='<%# Eval("DiscussionID") %>' />
                        <br />
                        <strong>Title:</strong>
                        <asp:TextBox ID="TitleTextBox3" runat="server" Text='<%# Bind("Title") %>' />
                        <br />
                        <strong>Date Discussion Created:</strong>
                        <asp:TextBox ID="DateCreatedTextBox1" runat="server" 
                            Text='<%# Bind("DateCreated") %>' />
                        <br />
                        <br />
                        <asp:Button ID="UpdateButton1" runat="server" CommandName="Update" 
                            Text="Update" />
                        <asp:Button ID="CancelButton1" runat="server" CommandName="Cancel" 
                            Text="Cancel" />
                        <br />
                        <br />
                        </span>
                    </SelectedItemTemplate>
            </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                
                
                
                SelectCommand="SELECT Discussion.DiscussionID, Discussion.Title, Discussion.DateCreated, aspnet_Users.UserName FROM (Discussion INNER JOIN aspnet_Users ON Discussion.UserIDFK = aspnet_Users.UserId) GROUP BY Discussion.Title, Discussion.DateCreated, Discussion.DiscussionID, aspnet_Users.UserName HAVING (aspnet_Users.UserName = ?) ORDER BY Discussion.DiscussionID DESC">
            <SelectParameters>
                <asp:QueryStringParameter Name="?" QueryStringField="UserID" />
            </SelectParameters>
            </asp:SqlDataSource>
        
        
        </div>
</asp:Content>
